<template>
  <div class="p-2">
    <transition>
      <el-tabs v-model="activeTab" @tab-click="handleClick">
        <el-tab-pane label="待接收" name="Await">
          <Await v-if="activeTab == 'Await'" />
        </el-tab-pane>
        <el-tab-pane label="变价记录" name="History">
          <History v-if="activeTab == 'History'" />
        </el-tab-pane>
      </el-tabs>
    </transition>
  </div>
</template>
<script setup lang="ts">
import type { TabsPaneContext } from 'element-plus';
import Await from './await/index.vue';
import History from './history/index.vue';

const activeTab = ref('Await');

/**
 * tabs切换
 */
const handleClick = (tab: TabsPaneContext, event: Event) => {
  // console.log(tab.props.name, event)
};
</script>
<style lang="scss" scoped></style>